//
//  PhoneViewController.m
//  Molian
//
//  Created by 胡津 on 16/7/15.
//  Copyright (c) 2015年 xiaocan. All rights reserved.
//

#import "PhoneViewController.h"
#import "BindingMobilePhoneViewController.h"
@interface PhoneViewController ()<BindingMobilePhoneViewControllerDelegate>
{
    UILabel *b;
}
@end

@implementation PhoneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"绑定手机号";
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    UILabel *a = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, DeviceWidth, 20)];
    a.textAlignment = NSTextAlignmentCenter;
    a.text = @"绑定手机号";
    a.font = [UIFont fontWithName:FontName size:13];
    a.textColor = [UIColor darkGrayColor];
    [self.view addSubview:a];
    
    
    b = [[UILabel alloc]initWithFrame:CGRectMake(0, 123, DeviceWidth, 30)];
    b.textAlignment = NSTextAlignmentCenter;
    b.text = [MLUser currentUser].notifyPhoneNum;
    b.font = [UIFont fontWithName:FontName size:30];
    [self.view addSubview:b];
    //登陆按钮
    BFPaperButton *c = [[BFPaperButton alloc]initWithFrame:CGRectMake(20, 190, DeviceWidth-40, 45 )raised:NO];
    [c setTitle:@"更换手机号码" forState:UIControlStateNormal];
    [c setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    c.layer.masksToBounds = YES;//开启圆角
    [c setBackgroundImage:[UIImage imageWithColor:APPCOLOR(1)] forState:UIControlStateNormal];
    [c.layer setCornerRadius:CGRectGetHeight([c bounds]) / 2];
    c.titleLabel.font = [UIFont fontWithName:FontName size:14];
    [c addTarget:self action:@selector(clickBFPaerBT) forControlEvents:UIControlEventTouchUpInside];
    
//    [c addTarget:self action:@selector(LOGIN:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:c];
}
- (void)bindingPhoneSucceeded
{
     b.text = [MLUser currentUser].notifyPhoneNum;
}
- (void)clickBFPaerBT
{
    BindingMobilePhoneViewController *bindingMPVC = [[BindingMobilePhoneViewController alloc] init];
    bindingMPVC.delegate = self;
    [self.navigationController pushViewController:bindingMPVC animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
